﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Text;
using iMES.Entity.SystemModels;

namespace iMES.Entity.DomainModels
{
    [Entity(TableCnName = "生产计划", TableName = "ProductionPlanning", DBServer = "SysDbContext")]
    public partial class ProductionPlanning:SysEntity
    {
        /// <summary>
        ///生产计划主键
        /// </summary>
        [Key]
        [Display(Name = "生产计划主键")]
        [Column(TypeName = "uniqueidentifier")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public Guid ProductionPlanningId { get; set; }

        /// <summary>
        ///生产计划编号
        /// </summary>
        [Display(Name = "生产计划编号")]
        [MaxLength(100)]
        [Column(TypeName = "varchar(100)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string? ProductionPlanningCode { get; set; }
        /// <summary>
        /// 报工数量
        /// </summary>
        [Display(Name = "报工数量")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int ReportworkNum { get; set; }


        /// <summary>
        ///成品主键
        /// </summary>
        [Display(Name = "成品主键")]
        [Column(TypeName = "uniqueidentifier")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public Guid ProductId { get; set; }

        /// <summary>
        ///生产订单主键
        /// </summary>
        [Display(Name = "生产订单主键")]
        [Column(TypeName = "uniqueidentifier")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public Guid ProductionOrderId { get; set; }

        /// <summary>
        ///计划开始日期
        /// </summary>
        [Display(Name = "计划开始日期")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? PlanningStartDate { get; set; }
        /// <summary>
        ///计划结束日期
        /// </summary>
        [Display(Name = "计划结束日期")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? PlanningEndDate { get; set; }
        /// <summary>
        ///实际开始日期
        /// </summary>
        [Display(Name = "实际开始日期")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? ActualStartDate { get; set; }
        /// <summary>
        ///实际结束日期
        /// </summary>
        [Display(Name = "实际结束日期")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? ActualEndDate { get; set; }

        /// <summary>
        ///创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? CreateDate { get; set; }

        /// <summary>
        ///创建人
        /// </summary>
        [Display(Name = "创建人")]
        [MaxLength(30)]
        [Column(TypeName = "nvarchar(30)")]
        [Editable(true)]
        public string Creator { get; set; }
        /// <summary>
        ///创建人编号
        /// </summary>
        [Display(Name = "创建人编号")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? CreateID { get; set; }
        /// <summary>
        /// 本次计划数量
        /// </summary>
        [Display(Name = "本次计划数量")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int CurrentPlanNum { get; set; }

    }
}
